package com.wisemoresystem.seal.model;

import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Transient;

import org.hibernate.annotations.GenericGenerator;
import org.ne.framework.data.model.DbModel;
import org.ne.framework.data.util.GenerateTools;

import com.wisemoresystem.seal.util.md5.MD5;

/**
 * 文件列表
 * 
 * @author 冯老师
 * 
 */
@Entity
public class t_file implements DbModel {

	@Transient
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(generator = "my_generator")
	@GenericGenerator(name = "my_generator", strategy = "uuid")
	@Column(length = 32)
	private String _id;

	private String file_name;
	private String new_file_name;
	private String folder;
	private String folder_url;

	private String content_type;
	private long size;// 文件大小

	private int status;
	private Timestamp created = new Timestamp(System.currentTimeMillis());

	// ======= get / set ()=================
	public String get_id() {
		return _id;
	}

	public void set_id(String _id) {
		this._id = _id;
	}

	public String getFile_name() {
		return file_name;
	}

	public void setFile_name(String file_name) {
		this.file_name = file_name;
	}

	public String getNew_file_name() {
		return new_file_name;
	}

	public void setNew_file_name(String new_file_name) {
		this.new_file_name = new_file_name;
	}

	public long getSize() {
		return size;
	}

	public void setSize(long size) {
		this.size = size;
	}

	public String getFolder() {
		return folder;
	}

	public void setFolder(String folder) {
		this.folder = folder;
	}

	public String getFolder_url() {
		return folder_url;
	}

	public void setFolder_url(String folder_url) {
		this.folder_url = folder_url;
	}

	public String getContent_type() {
		return content_type;
	}

	public void setContent_type(String content_type) {
		this.content_type = content_type;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public Timestamp getCreated() {
		return created;
	}

	public void setCreated(Timestamp created) {
		this.created = created;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public static void main(String[] args) {
		System.err.println(MD5.md5("123456"));
		System.err.println(GenerateTools.getBase58ID());
	}

}
